package com.kingschan.jeasytag.core.parse.properties;

import java.util.HashMap;
import java.util.Map;

import com.kingschan.jeasytag.core.parse.properties.impl.BooleanFieldParseImpl;
import com.kingschan.jeasytag.core.parse.properties.impl.EventFieldParseImpl;
import com.kingschan.jeasytag.core.parse.properties.impl.IntArrayFieldParseImpl;
import com.kingschan.jeasytag.core.parse.properties.impl.JsonArrayFieldParseImpl;
import com.kingschan.jeasytag.core.parse.properties.impl.JsonFieldParseImpl;
import com.kingschan.jeasytag.core.parse.properties.impl.NumberFieldParseImpl;
import com.kingschan.jeasytag.core.parse.properties.impl.StringFieldParseImpl;

/**
 * 
 * @author kingschan
 *date:2013-7-11
 */
public class ParseFactory {

	private static Map<String, PropertiesParse> parse;
	static{
		parse= new HashMap<String, PropertiesParse>();
		
		parse.put("BooleanField", new BooleanFieldParseImpl() );
		parse.put("EventField", new EventFieldParseImpl());
		parse.put("IntArrayField", new IntArrayFieldParseImpl() );
		parse.put("JsonArrayField", new JsonArrayFieldParseImpl());
		parse.put("JsonField", new JsonFieldParseImpl());
		parse.put("NumberField", new NumberFieldParseImpl());
		parse.put("StringField", new StringFieldParseImpl());
	}
	/**
	 * get PropertiesParse
	 * @param key
	 * @return
	 */
	public static PropertiesParse getParse(String key){
		return parse.get(key);
	}
}
